package com.young.test.aop;

import org.apache.log4j.Logger;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;


@Component
@Aspect
public class WithinPointcutAspect {
	/**
	 * Logger for this class
	 */
	private static final Logger logger = Logger.getLogger(WithinPointcutAspect.class);
	
	@Before("com.young.test.aop.SystemArchitecture.inBeanPackage()")
	public void beforeBeanOperation(JoinPoint joinPoint){
		String targetName = joinPoint.getTarget().getClass().getSimpleName();
		logger.info("This use \"within\" match, before "+targetName+" method execution");
		
	}

}
